package com.zmn.oms.persistence.interfaces.track;

import com.zmn.oms.model.entity.track.OrderTrack;
import com.zmn.oms.model.entity.track.OrderTrackQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 类描述：跟单
 *
 * @author lujia
 * @date 2018-12-20 21:36:16
 */
@Deprecated
public interface OrderTrackDao {
    /**
     * 根据跟单id查找
     * @param trackId
     * @return
     */
    OrderTrack findById(Long trackId);

    /**
     * 根据订单id集合查询订单跟单信息
     * @param orderIdList 订单Id集合
     * @return 订单跟单信息
     */
    List<OrderTrack> listOrderTrackByOrderIdList(@Param("orderIdList") List<Long> orderIdList);

    /**
     * 根据工单id 查询跟单记录
     * @param orderId
     * @param workId
     * @return
     */
    List<OrderTrack> listOrderTrackByWorkId(@Param("orderId") Long orderId, @Param("workId") Long workId);

    /**
     * 根据条件查询跟单数量
     * @param query
     * @return
     */
    Integer countByQuery(OrderTrackQuery query);

    /**
     * 保存跟单数据
     * @param record
     * @return
     */
    int insertOrderTrack(OrderTrack record);

    /**
     * 保存跟单数据
     * @param orderTrackList
     * @return
     */
    int insertOrderTrackList(@Param("orderTrackList") List<OrderTrack> orderTrackList);

    /**
     * 保存完成跟单数据
     * @param orderTrackList
     * @return
     */
    Integer insertCompleteOrderTrackList(@Param("orderTrackList") List<OrderTrack> orderTrackList);

    /**
     * 修改跟单数据
     * @param record
     * @return
     */
    int updateOrderTrack(OrderTrack record);

    /**
     * 根据跟单id集合删除
     * @param trackIdList
     * @return
     */
    int deleteByTrackIdList(@Param("trackIdList") List<Long> trackIdList);
}